<?php echo $this->Html->scriptStart(array('inline' => false)) ?>
<!-- 
	var pushUrl = '<?php echo $this->Html->url(array('controller' => 'notifications', 'action' => 'index')) ?>';
	//var pushUrl = 'http://192.168.1.77/comet.php';
	
	function connect() {
		$.ajax({
			'url': pushUrl,
			'success': function(response) {
				$('#test').append('<div>' + response + '</div>');
			},
			'complete': function() {
				connect();
			}
		});
	}

	$(document).ready(function(){
		connect();
	});
 -->
<?php echo $this->Html->scriptEnd(); ?>

 
 <div id="test">
 
 </div>